<?php
/**
 * This class is responsible for managing response behaviours
 * it's only extra functionality from ForageBehaviourHandler is
 * to restrict added behaviours to ForageResponseBehaviour objects.
 *
 * @author Rob Young <rob@roryoung.co.uk>
 * @package forage.behaviours
 */
class ForageResponseBehaviourHandler extends ForageBehaviourHandler
{
  /**
   * Add a behaviour to this handler
   *
   * @param ForageResponseBehaviour
   */
  public function addBehaviour($behaviour)
  {
    if (!($behaviour instanceof ForageResponseBehaviour)) {
      throw new InvalidArgumentException("Expecting a ForageResponseBehaviour");
    }
    parent::addBehaviour($behaviour);
  }
}

/**
 * Abstract base class for all behaviours relating to ForageResponse
 * objets.
 *
 * @author Rob Young <rob@roryoung.co.uk>
 * @package forage.behaviours
 */
abstract class ForageResponseBehaviour extends ForageBehaviour
{
}

